﻿<%@ Page Title="Check-in" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DepCheckIn.aspx.cs" Inherits="IFD2.DepCheckIn" %>

<%@ Register Src="~/ctlSelectSeat.ascx" TagPrefix="uc1" TagName="ctlSelectSeat" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <form id="form1" runat="server" role="form" class="form-inline" defaultbutton="lbtnQueryID">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <div class="container-fluid body-content" style="width:100%;">

    <div class="row">
        <div class="col-sm-2 well well-sm">
            <h5><asp:Literal ID="litTitle" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h5>
            <div class="form-group">
                <asp:Label ID="Label6" runat="server" Text="Airport:" meta:resourcekey="Airport"></asp:Label>
                <asp:TextBox ID="txtAirport" runat="server" cssclass="form-control input-sm" Width="100%" ReadOnly="True" Enabled="False"></asp:TextBox>
                <asp:Label ID="Label3" runat="server" Text="Date:" meta:resourcekey="Date"></asp:Label>
                <asp:TextBox ID="txtFltDate" runat="server" cssclass="form-control input-sm" Width="100%" MaxLength="15"></asp:TextBox>
            </div>
            <br class="hidden-xs"/>
        
            <asp:Label ID="Label1" runat="server" Text="Airline:" meta:resourcekey="Airline" Enabled="False" Visible="False"></asp:Label>
            <asp:TextBox ID="txtAirline" runat="server" cssclass="form-control input-sm" Width="100%" MaxLength="3" Enabled="False" Visible="False"></asp:TextBox>
            <asp:HiddenField ID="hidPaxSn" runat="server" />
            <asp:HiddenField ID="hidSearchNo" runat="server" />
            <asp:HiddenField ID="hidSearchWhat" runat="server" />
        </div>

        <div class="col-sm-10 well well-sm">
            <asp:Label ID="Label4" runat="server" Text="ID No./Order No.:" meta:resourcekey="OrderNo"></asp:Label>
            <asp:TextBox ID="txtNumber" runat="server" MaxLength="20" cssclass="form-control input-sm" Width="220px"></asp:TextBox>
            <asp:LinkButton ID="lbtnQueryID" runat="server" CssClass="btn btn-primary"  meta:resourcekey="SearchID" OnClick="lbtnQueryID_Click"></asp:LinkButton>
            <asp:LinkButton ID="lbtnQueryOrder" runat="server" CssClass="btn btn-primary"  meta:resourcekey="SearchOrder" OnClick="lbtnQueryOrder_Click"></asp:LinkButton>
            <br /><br />
            <div class="panel">
                <div class="panel-heading btn-primary">
                    <h6 class="panel-title" id="section-2"><asp:Literal ID="Literal1" runat="server" meta:resourcekey="PaxInfo"></asp:Literal></h6>
                </div>
                <div class="panel-body">
                    
                    <div class="table-responsive">
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None"
                            style="min-width:2800px;width:100%;" class="table-hover">
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <Columns>
                                <asp:TemplateField HeaderText=" ">
                                    <ItemTemplate>
                                        <input type="radio" name="KEY" value='<%#Eval("bk_id")+"|"+Eval("pax_sn")+"|"+Eval("trip_sn") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="BatchSel." meta:resourcekey="MultiSelect">
                                    <ItemTemplate>
                                    <asp:CheckBox ID="select"  runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="PaxName" SortExpression="PaxName" meta:resourcekey="PaxName" ItemStyle-ForeColor="Blue">
                                    <ItemTemplate>
                                        <%# Eval("family_name")+"/" + Eval("name") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="EnglishName" SortExpression="EnglishName" meta:resourcekey="EnglishName" ItemStyle-ForeColor="Blue">
                                    <ItemTemplate>
                                        <%# Eval("family_name_en")+"/" + Eval("name_en") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="age_type" HeaderText="age_type" SortExpression="age_type"  meta:resourcekey="age_type" ItemStyle-ForeColor="Blue" />
                                <asp:CheckBoxField DataField="vip" HeaderText="VIP" SortExpression="vip" />
                                <asp:BoundField DataField="id_type" HeaderText="id_type" SortExpression="id_type"  meta:resourcekey="id_type" />
                                <asp:BoundField DataField="id_no" HeaderText="id_no" SortExpression="id_no"  meta:resourcekey="id_no" ItemStyle-ForeColor="Blue" />
                                <asp:BoundField DataField="id_expired_date" HeaderText="id_expired_date" SortExpression="id_expired_date"  meta:resourcekey="id_expired_date" />
                                <asp:BoundField DataField="dcs_status" HeaderText="dcs_status" SortExpression="dcs_status"  meta:resourcekey="dcs_status" ItemStyle-ForeColor="Blue" />
                                <asp:TemplateField HeaderText="Seat" SortExpression="Seat" meta:resourcekey="Seat1" ItemStyle-ForeColor="Blue">
                                    <ItemTemplate>
                                        <%# Eval("seat_row") +""+ Eval("seat_col")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="bag_count" HeaderText="bag_count" ReadOnly="True" SortExpression="bag_count"  meta:resourcekey="bag_count" />
                                <asp:BoundField DataField="bag_weight" HeaderText="bag_weight" ReadOnly="True" SortExpression="bag_weight"  meta:resourcekey="bag_weight" />
                                <asp:BoundField DataField="seat_type" HeaderText="seat_type" SortExpression="seat_type"  meta:resourcekey="seat_type" />
                                <asp:TemplateField HeaderText="Flight" SortExpression="Flight" meta:resourcekey="Flight1">
                                    <ItemTemplate>
                                        <%# Eval("airline") +""+ Eval("flt_no")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:CheckBoxField DataField="virtual" HeaderText="virtual" SortExpression="virtual" meta:resourcekey="virtual" />
                                <asp:TemplateField HeaderText="OpFlight" SortExpression="OpFlight" meta:resourcekey="OpFlight">
                                    <ItemTemplate>
                                        <%# Eval("op_airline") + ""+ Eval("op_flt_no")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="cabin" HeaderText="cabin" SortExpression="cabin"  meta:resourcekey="cabin" />
                                <asp:BoundField DataField="class" HeaderText="class" SortExpression="class"  meta:resourcekey="class" />
                                <asp:BoundField DataField="seat_status" HeaderText="seat_status" SortExpression="seat_status"  meta:resourcekey="seat_status" />
                                <asp:BoundField DataField="ori_airport" HeaderText="ori_airport" SortExpression="ori_airport"  meta:resourcekey="ori_airport" />
                                <asp:BoundField DataField="des_airport" HeaderText="des_airport" SortExpression="des_airport"  meta:resourcekey="des_airport" />
                                <asp:BoundField DataField="bk_id" HeaderText="bk_id" ReadOnly="True" SortExpression="bk_id"  meta:resourcekey="bk_id" />
                                <asp:BoundField DataField="pax_sn" HeaderText="pax_sn" ReadOnly="True" SortExpression="pax_sn"  meta:resourcekey="pax_sn" />
                                <asp:BoundField DataField="trip_sn" HeaderText="trip_sn" ReadOnly="True" SortExpression="trip_sn"  meta:resourcekey="trip_sn" />
                                <asp:BoundField DataField="ffp_airline" HeaderText="ffp_airline" SortExpression="ffp_airline"  meta:resourcekey="ffp_airline" />
                                <asp:BoundField DataField="ffp_no" HeaderText="ffp_no" SortExpression="ffp_no"  meta:resourcekey="ffp_no" />
                                <asp:BoundField DataField="nationality" HeaderText="nationality" SortExpression="nationality"  meta:resourcekey="nationality" />
                                <asp:BoundField DataField="inf_dob" HeaderText="dob" SortExpression="dob"  meta:resourcekey="inf_dob" />
                                <asp:BoundField DataField="remark" HeaderText="remark" SortExpression="remark"  meta:resourcekey="remark" />
                                <asp:BoundField DataField="mobile_phone" HeaderText="mobile_phone" SortExpression="mobile_phone"  meta:resourcekey="mobile_phone" />
                                <asp:BoundField DataField="email" HeaderText="email" SortExpression="email"  meta:resourcekey="email" />
                                <asp:BoundField DataField="dcs_user" HeaderText="dcs_user" ReadOnly="True" SortExpression="dcs_user"  meta:resourcekey="dcs_user" />
                                <asp:BoundField DataField="dcs_time" HeaderText="dcs_time" ReadOnly="True" SortExpression="dcs_time"  meta:resourcekey="dcs_time" />
                            </Columns>
                            <RowStyle BackColor="#EFF3FB" />
                            <EditRowStyle BackColor="#2461BF" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>

                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>" SelectCommand="bll_tkt_search_departure_pax_by_booking" SelectCommandType="StoredProcedure" DataSourceMode="DataReader">
                            <SelectParameters>
                                <asp:SessionParameter Name="airport" SessionField="DCS_AIRPORT" Type="String" />
                                <asp:ControlParameter ControlID="hidFltDate" Name="flt_date" PropertyName="Value"
                                    Type="DateTime" />
                                <asp:ControlParameter ControlID="hidSearchNo" Name="order_no" PropertyName="Value"
                                    Type="Int64" />
                                <asp:SessionParameter Name="office" SessionField="OFFICE" Type="String" />
                                <asp:SessionParameter Name="airline" SessionField="AIRLINE" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="SqlSearchID" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>" SelectCommand="bll_tkt_search_departure_pax_by_id" SelectCommandType="StoredProcedure" DataSourceMode="DataReader">
                            <SelectParameters>
                                <asp:SessionParameter Name="airport" SessionField="DCS_AIRPORT" Type="String" />
                                <asp:ControlParameter ControlID="hidFltDate" Name="flt_date" PropertyName="Value"
                                    Type="DateTime" />
                                <asp:ControlParameter ControlID="hidSearchNo" Name="id_no" PropertyName="Value" Type="String" />
                                <asp:SessionParameter Name="office" SessionField="OFFICE" Type="String" />
                                <asp:SessionParameter Name="airline" SessionField="AIRLINE" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </div>
                    <asp:Label ID="lblNote" runat="server" Text="StatusDesc" meta:resourcekey="StatusDesc"></asp:Label>

                    <div class="well well-sm">
                        <div class="form-group">
                        <asp:Label ID="Label10" runat="server" Text="Baggage Count:" meta:resourcekey="BaggageCount"></asp:Label>&nbsp;
                        <asp:DropDownList ID="lstBagCount" runat="server">
                            <asp:ListItem>0</asp:ListItem>
                            <asp:ListItem>1</asp:ListItem>
                            <asp:ListItem>2</asp:ListItem>
                            <asp:ListItem>3</asp:ListItem>
                            <asp:ListItem>4</asp:ListItem>
                            <asp:ListItem>5</asp:ListItem>
                            <asp:ListItem>6</asp:ListItem>
                        </asp:DropDownList>
                        <asp:Label ID="Label11" runat="server" Text="Total Weight:" meta:resourcekey="TotalWeight"></asp:Label>
                        <asp:TextBox ID="txtWeight" runat="server" Width="65px">0</asp:TextBox>
                        <asp:Label ID="Label12" runat="server" Text="KG" meta:resourcekey="KG"></asp:Label>
                        </div>
                        <div class="form-group">
                        <asp:CheckBox ID="chkAutoAssign" runat="server" Text="Auto Assign" Checked="True"  meta:resourcekey="AutoAssign"/>
                        <asp:CheckBox ID="chkBlockChkIn" runat="server" Text="Force Check In" meta:resourcekey="ForceCheckIn"/>
                        <asp:Button ID="btnCheckIn" runat="server" Text="Single Check In" OnClick="btnCheckIn_Click"  meta:resourcekey="SingleCheckIn" CssClass="btn btn-sm btn-default" />&nbsp;
                        </div>
                        <div class="btn-group">
                        <asp:Button ID="btnAddBag" runat="server" OnClick="btnAddBag_Click" Text="Add Baggage"  meta:resourcekey="AddBaggage"  CssClass="btn btn-sm btn-default" />
                        <asp:Button ID="btnSetBag" runat="server" Text="Set Baggage" OnClick="btnSetBag_Click"  meta:resourcekey="SetBaggage"  CssClass="btn btn-sm btn-default" />
                        </div>
                    </div>
                    <asp:Label ID="lblError" runat="server" CssClass="ifdMessage"></asp:Label>
                    <div class="well well-sm">
                        <div class="btn-group">
                            <asp:Button ID="btnPrnBoardingPass" runat="server" Text="Print Boarding Pass"  meta:resourcekey="PrintBoardingPass" OnClick="btnPrnBoardingPass_Click" CssClass="btn btn-sm btn-default" />
                            <asp:Button ID="btnPrintBagTag" runat="server" Text="Print Baggage Tags"  meta:resourcekey="PrintBaggageTags" OnClick="btnPrintBagTag_Click" CssClass="btn btn-sm btn-default" />
                            <asp:Button ID="btnCheckOut" runat="server" OnClick="btnCheckOut_Click" Text="Check Out" meta:resourcekey="CheckOut" CssClass="btn btn-sm btn-default"/>
                            <asp:Button ID="btnTktLogs" runat="server" Text="Logs..." OnClick="btnTktLogs_Click"  meta:resourcekey="Logs" CssClass="btn btn-sm btn-default" />
                        </div>
                    </div>

                    <div class="well well-sm">
                        <div class="btn-group">
                            <asp:Button ID="btnBatchChkIn" runat="server" Text="Batch Check In"  meta:resourcekey="BatchCheckIn" OnClick="btnBatchChkIn_Click" CssClass="btn btn-sm btn-default"/>
                            <asp:Button ID="btnBatchPrnPass" runat="server" Text="Batch Prn Pass" OnClick="btnBatchPrnPass_Click" meta:resourcekey="BatchPrnPass" CssClass="btn btn-sm btn-default" />
                            <asp:Button ID="btnBatchPrnTags" runat="server" Text="Batch Prn Tags_X" Enabled="False" OnClick="btnBatchPrnTags_Click" Visible="False" CssClass="btn btn-sm btn-default" />
                        </div>
                    </div>

                    <div class="well well-sm">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <div class="table-responsive">
                                <uc1:ctlSelectSeat runat="server" ID="ctlSelectSeat" />
                                </div>
                                <asp:Button ID="btnRefreshSeatMap" runat="server" Text="Refresh Seat Map" OnClick="btnRefreshSeatMap_Click"  meta:resourcekey="RefreshSeatMap" CssClass="btn btn-sm btn-default" /><br />
                                <asp:Label ID="lblError2" runat="server" CssClass="ifdMessage"></asp:Label>
                                <asp:HiddenField ID="hidSearchNo2" runat="server" />
                                <asp:HiddenField ID="hidFltDate" runat="server" />
                                <asp:HiddenField ID="hidAirline" runat="server" />
                                <asp:HiddenField ID="hidAirport" runat="server" />
                                <asp:HiddenField ID="hidSearchWhat2" runat="server" />
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </div>

                </div>
            </div>
        </div>
    </div>

    </div>
    </form>

</asp:Content>
